home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 8 / Amoszine 8 (Disk 2 of 3).adf / Powerbobs.lha / powerbobsv1.0 / examples / Div_Array_vs_Plsr_Array.asc < prev    next >
Text File  |  1995-06-30  |  543b  |  32 lines

  1. 'This example shows the use of the Plsr command. 
  2. '
  3. 'Plsr allows VERY FAST Div by 2^N. (2,4,8,16,32...)
  4. '
  5. 'In this example we use, 2^4=16. 
  6. '
  7. 'Plsr,Plsl,Pasr & Pasl all follow the same format. 
  8. '
  9. Dim X(1000)
  10. Input "Give range, max 1000 : ";_MAX
  11. '
  12. T=Timer
  13. For I=1 To 100
  14.    For K=0 To _MAX
  15.       X(K)=X(K)/16
  16.    Next 
  17. Next 
  18. '
  19. 'Display the ellapsed time in Vbl's
  20. '
  21. Print "Normal code:";Timer-T
  22. '
  23. ADRESS_X=Varptr(X(0))
  24. T=Timer
  25. For I=1 To 100
  26.    Plsr ADRESS_X,4,0 To _MAX
  27. Next 
  28. '
  29. 'Display the ellapsed time in Vbl's
  30. '
  31. Print "Powerbobs  :";Timer-T
  32.